package com.dmgis.qxfw.utils;

/**
 * 客户端返回结果信息类
 * 
 * @author zhuc
 * 
 */
public class ResultObj {
	private String message = "";
	private Object data = null;
	private boolean status = true;

	public ResultObj() {

	}

	public ResultObj(String message, Object data, boolean status) {
		this.message = message;
		this.data = data;
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}
	@Override
	public String toString() {
		String msgStr = "";
		if (message != null && !"".equals(message.trim())) {
			msgStr += "返回信息为" + message + ", ";
		}
		
		while (msgStr.endsWith(", ")) {
			msgStr = msgStr.substring(0, msgStr.length() - 1);			
		}
		return msgStr;
	}
}
